<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="common.jsp" %>
<%@ page import="java.util.*" %>
<jsp:useBean id="cart" scope="session" class="mypack.ShoppingCart"/>

<%
java.util.Collection l = bookDB.getManager(1235);
            java.util.Iterator i = l.iterator();
            Manager bt = null;
             float total=0;
            while (i.hasNext()) {
                bt = (Manager) i.next();             
                float money = bt.getMoney();
                   float dealmoney = (float) cart.getTotal();
                total = money + dealmoney;                   
                }
             bt.setId(1235);
            bt.setManager("谷连军");
          bt.setPwd("1");
         bt.setMoney(total);
        bookDB.updateManager(bt);

            bookDB.buyBooks(cart);
            session.invalidate();

%>
<html>
    <head><title>TitleReceipt</title>
        <link href="CSS/style1.css" rel="stylesheet">
    </head>
    <body>
        <table width="100%" border="0">
            <tr>
                <td><center>
                        <table width="750" height="250" border="0" bgcolor="#FFFFFF">
                            <tr>
                                <td><jsp:include page="banner.jsp"/></td>
                            </tr>
                            <tr>
                                <td height="125">      
                                    <h3>谢谢您光临吹破天网上书店。</h3><br>
                                    
                                    <strong><a href="<%=request.getContextPath()%>/bookstore.jsp">继续购物</a>&nbsp;&nbsp;&nbsp;</strong>
                                </td>
                            </tr>
                            <tr>
                                <td><jsp:include page="copyright.jsp"/></td>
                            </tr>
                    </table></center>
                    
                </td>
            </tr>
        </table>
    </body>
</html>




